package com.hachismart;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;

/**
 * @author abbott
 */
@SpringBootApplication
@ImportResource(locations = {"classpath*:spring/spring-redis.xml"})
public class HachiApplication extends SpringBootServletInitializer {
    //log4j2 报警邮件需要这样写
    static {
        System.setProperty("mail.smtp.starttls.enable","true");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(HachiApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(HachiApplication.class, args);
    }

}
